package com.qyy.remotemonitor.model.contract.remotemonitor;

import android.app.Application;

import com.qyy.remotemonitor.http.bean.HttpOperationBean;
import com.qyy.remotemonitor.http.bean.HttpUploadCallRecordsBean;
import com.wang.android.library.di.EasyBasePresenter;
import com.wang.android.library.ui.IFBaseView;

import javax.annotation.Nonnull;

/**
 * Created by qinyy on 2018/10/5.
 */

public interface RemoteMonitorContract
{
    interface View extends IFBaseView
    {
   //     void modifyPhoneNumSuccess();
        void queryOperationSuccess(HttpOperationBean bean);
        void queryOperationFailure(String errorCode,String errorMsg);

        void uploadCallRecordSuccess(HttpUploadCallRecordsBean bean);
        void uploadCallRecordFailure(String errorCode,String errorMsg);
    }

    interface Presenter extends EasyBasePresenter<View>
    {
        // 查询一条最新的未执行的指令操作
        void queryOperation();
        // 回写操作的执行状态
        void writeOperationDone(String id);
        // 初始化位置管理
        void initLocation(@Nonnull Application context);
        // 上传位置信息
        void uploadLocation(double lat, double lon, int operatorId);
        // 获取通话记录并保存数据库
        void updateCallsHistory();
        // 上传通话记录
        void uploadCallRecord(long beginDate,long endDate, int operatorId);
    }
}
